﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PureGridView.aspx.cs" Inherits="GridView_PureGridView" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:GridView 
        ID="grv" 
        DataSourceID="ods"
        OnInit="grv_Init"
        runat="server">
        <Columns>
          <asp:CommandField 
            ShowEditButton="True" 
            ShowDeleteButton="True" />
          <asp:TemplateField HeaderText="CustomerID">
            <ItemTemplate>
              <asp:Label 
                ID="tfCustomerID" 
                Text='<%# Bind("CustomerID") %>'
                runat="server" />
            </ItemTemplate>
            <EditItemTemplate>
              <asp:Label 
                ID="tfCustomerID" 
                Text='<%# Bind("CustomerID") %>'
                runat="server" />
            </EditItemTemplate>
          </asp:TemplateField>
          <asp:TemplateField HeaderText="CompanyName">
            <ItemTemplate>
              <asp:Label 
                ID="tfCompanyName" 
                Text='<%# Bind("CompanyName") %>'
                runat="server" />
            </ItemTemplate>
            <EditItemTemplate>
              <asp:TextBox 
                ID="tfCompanyName" 
                Text='<%# Bind("CompanyName") %>'
                runat="server" />
            </EditItemTemplate>
          </asp:TemplateField>
        </Columns>
      </asp:GridView>
      
      <asp:ObjectDataSource 
        ID="ods" 
        OnInit="ods_Init"
        runat="server" />
    </div>
    </form>
</body>
</html>
